#include "JWorkingCopiesFile.h"


JWorkingCopiesFile::JWorkingCopiesFile(JWorkingCopiesFileOperation _operate,int _lastChangeVersion,
                int _version,std::string _author,std::string _fullFileName,std::string _dirOrFile)
                : JWorkingCopiesBaseFile(_operate,_lastChangeVersion,
                        _version,_author,_fullFileName,_dirOrFile),file(_fullFileName)
{
    
}


JWorkingCopiesFile::~JWorkingCopiesFile(void)
{
    
}

int JWorkingCopiesFile::Serialize(JInOutPut& _strea,int& allSize)
{
    int classSize = 0,selfSize = 0;
    JSerialize::PutInt(_strea,classSize,selfSize);
    JWorkingCopiesBaseFile::Serialize(_strea,classSize);
    file.Serialize(_strea,classSize);
    selfSize += classSize;
    JSerialize::Verify(_strea,classSize,-1*selfSize);
    allSize += selfSize;
    return selfSize;
}
int JWorkingCopiesFile::ReSerialize(JInOutPut& _strea)
{
    int classSize = JSerialize::GetInt(_strea,sizeof(int));
    JWorkingCopiesBaseFile::ReSerialize(_strea);
    file.ReSerialize(_strea);
    return classSize;
}